-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented overwrite guardrails thanks to @tjlaboss. #443
Implemented overwrite guardrails thanks to @tjlaboss. #443
Conversation
Do you think this change counts as a minor or patch version change? |
Completed. |
This fits the description of MINOR version more closely than PATCH version I'd say. |
Nice to see that #439 is useful. |
Ok I'll update docs to say version |
Description
This introduces a new argument to
MCNP_Problem.write_to_file
, (andmontepy.input_parser.input_file.write_to_file.open
),overwrite
, which indicates if the existing file should be overwritten. The default behavior is to raise aFileExistsError
if the file exists, and overwrite is not specified. This error is ignored inoverwrite=True
. No matter what aIsADirectoryError
is raised if the path is a folder.Thanks @tjlaboss for the prototyping.
Fixes #442
Checklist